home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB Division (Quotient$, Divisor$)
-
- COLOR 15, 1
- CLS
- LOCATE 5, 5
- PRINT "x = ";
- Division "-b ± √b² - 4ac", "2 a"
-
-
- LOCATE 10, 9: PRINT "⌠∞";
- LOCATE 11, 5: PRINT "x = │ y² + 17yⁿ δy/δx";
- LOCATE 12, 8: PRINT "0⌡";
-
- DEFINT A-Z
- '---------------------------------------------------------------------------
- ' Name: Division
- ' Purpose: Print one expression below another, with a division
- ' bar between them. Printing is at current cursor
- ' position. The expressions are centred w.r.t. bar.
- '---------------------------------------------------------------------------
- SUB Division (Quotient$, Divisor$)
- d1 = LEN(Quotient$)
- d2 = LEN(Divisor$)
- d3 = d1
- OldRow = CSRLIN
- OldCol = POS(0)
- IF d3 < d2 THEN d3 = d2
- FOR i = 1 TO d1: PRINT CHR$(196); : NEXT
- LOCATE OldRow - 1, OldCol + ((d3 - d1) \ 2)
- PRINT Quotient$
- LOCATE OldRow + 1, OldCol + ((d3 - d2) \ 2)
- PRINT Divisor$
- END SUB
-